package cn.zjutleo.village_server.service;

import cn.zjutleo.village_server.entity.RepairApply;
import cn.zjutleo.village_server.mapper.RepairApplyMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: 张坤
 * @DateTime: 2022/1/13 22:54
 * @Description: 该类用于 TODO
 */
@Service
public class RepairApplyService {
    @Resource
    RepairApplyMapper repairApplyMapper;

    public List<RepairApply> selectAll(){
        return repairApplyMapper.selectAll();
    }


    public int submitRepairInfo(RepairApply repairApply){
        return repairApplyMapper.submitRepairInfo(repairApply);
    }

    public RepairApply selectById(Integer id){
        return repairApplyMapper.selectById(id);
    }

    public List<String> getAllRepairType(){
        return repairApplyMapper.getAllRepairType();
    }


    public List<RepairApply> getRepairInfoFuzzySearch(String date,String type,String fuzzySearch){
        return repairApplyMapper.getRepairInfoFuzzySearch(date, type, fuzzySearch);
    }


    public Integer getRoleRightById(Integer id){
        return getRoleRightById(id);
    }


    public int updateRaState(int ra_id,int newRaState){
        return repairApplyMapper.updateRaState(ra_id,newRaState);
    }
}
